# coding=utf-8
# @Author: back
# @Time: 2024/10/11 11:55
from PySide6.QtWidgets import QApplication, QMainWindow, QWidget, QGridLayout, QFileDialog, QMessageBox
from PySide6.QtCore import Qt, QThread, Signal
from PySide6.QtCore import QPropertyAnimation, QEasingCurve, QEvent, QTimer, QTime
from PySide6.QtGui import QIcon, QPainter, QBrush, QColor, QCursor, QPixmap, QImage, QConicalGradient, QPen, QFont
from PySide6 import *
from PySide6.QtWidgets import *
import sys

from ui.login_ui import UiMainWindow


class LoginMainWin(QMainWindow):
    def __init__(self):
        super().__init__()
        self.ui = UiMainWindow()
        self.ui.setup_ui(self)
        self.show()
        self.init_slot()

    def stack_index(self):
        self.ui.stackedwidget.setCurrentIndex(0)

    def stack_index2(self):
        self.ui.stackedwidget.setCurrentIndex(1)

    def init_slot(self):
        self.stack_index()
        self.ui.login3.clicked.connect(self.stack_index)
        self.ui.reg2.clicked.connect(self.stack_index2)


if __name__ == '__main__':
    app = QApplication(sys.argv)
    window = LoginMainWin()
    window.show()
    sys.exit(app.exec())
